<template>
  <div class="OrderScanCar">
    <header>
      <i class="iconfont icon-xiangzuo1" @click="goPrev"></i
      ><span>装车扫描</span
      ><i class="iconfont icon-shanguangdeng" @click="flashOpenOrClose"></i
      ><i class="iconfont closeScan" @click="closeScan">关闭</i>
    </header>
    <div class="common-box">
      <div class="content-box">
        <v-scan
          @scanData="scanData"
          ref="ch"
          :switchScan="switchScan"
          :loadingData="loadingData"
        ></v-scan>
      </div>
    </div>
    <div class="PickUpRandomScan_orderbox">
    <div class="address">
      <p  style="font-size: 16px; line-height: 38px;margin-left: 5px;">类型：</p> 
      <el-select v-model="type" placeholder="请选择类型" style="width: 84%"  filterable>
        <el-option v-for="item in typeList" :key="item.v" :label="item.v" :value="item.v"></el-option>
      </el-select>
    </div>
    <div class="address">
      <p  style="font-size: 16px; line-height: 38px;margin-left: 5px;">班次：</p> 
      <el-select v-model="classes" placeholder="请选择班次" style="width: 84%"  filterable remote>
					<el-option v-for="item in classesList" :key="item.v" :label="item.v" :value="item.v"></el-option>
				</el-select>
    </div>
    <div class="address">
      <p  style="font-size: 16px; line-height: 38px;margin-left: 5px;">车牌：</p>
      <el-select v-model="vehicleNo" placeholder="请选择车牌" style="width: 84%"  filterable remote :remote-method="getVehicleList">
					<el-option v-for="item in vehicleList" :key="item.vehicleNo" :label="item.vehicleNo" :value="item.vehicleNo"></el-option>
				</el-select>
    </div>
    <div class="address">
      <p  style="font-size: 16px; line-height: 38px;margin-left: 5px;">日期：</p>
      <el-date-picker
          v-model="time"
          type="date"
          value-format="yyyy-MM-dd"
          style="width: 84%" 
          placeholder="选择日期" >
        </el-date-picker>
    </div>
      <div class="order-level level2">
        <el-tabs v-model="activeName" :stretch="true" v-loading="loadingData">
          <el-tab-pane label="扫描子单" name="first">
            <div class="order-list">
              <div
                class="order-list_item"
                v-for="(orderscanitem, orderscanidx) in orderListScanned"
                :id="orderscanidx"
                :key="orderscanidx"
              >
                <div class="order-list_item_flight_2">
                  <div v-if="orderscanitem.tempFieldTwo" style="color: red">{{ orderscanitem.tempFieldOne }}</div>
                  <div v-else>{{ orderscanitem.tempFieldOne }}</div>
                </div>
                <div class="order-list_item_flight">
                  <div>{{ orderscanitem.labelNo }}</div>
                </div>
                <div class="order-list_item_order">子单号</div> 
              </div>
            </div>
            <!-- <div class="no-data" v-if="orderList.length == 0">
              <div class="right-bg"></div>
            </div> -->
          </el-tab-pane>
          <el-tab-pane :label="'历史子单(' + historyLabelNo.length + ')'" name="second">
            <div class="order-list">
              <div
                class="order-list_item"
                v-for="(scanitem, scanidx) in scanned"
                :id="scanidx"
                :key="scanidx + 'w'"
              >
                <div class="order-list_item_order">
                  母单号: {{ scanitem.omsNo }}
                </div>
                <div class="order-list_item_item" v-for="(scanitem_item, scanitemidx) in scanitem.waybillNumber" :key='scanitemidx + "y"'>
                  {{ scanitem_item }}
                </div>
              </div>
            </div>
            <div class="no-data no-data2" v-show="historyLabelNo.length == 0">
              <div class="right-bg"></div>
            </div>
          </el-tab-pane>
          <el-tab-pane
            :label="'未扫描子单(' + notScanLabelNo.length + ')'"
            name="third"
          >
            <div class="order-list">
              <div
                class="order-list_item"
                v-for="(notscanitem, notscanidx) in notScanned"
                :id="notscanidx"
                :key="notscanidx + 'g'"
              >
                <div class="order-list_item_order">
                  母单号: {{ notscanitem.omsNo }}
                </div>
                <div class="order-list_item_item" v-for="(notscanitem_item, notscanitemidx) in notscanitem.waybillNumber" :key="notscanitemidx + 'd'">
                  {{ notscanitem_item }}
                </div>
              </div>
            </div>
            <div class="no-data no-data2" v-show="notScanLabelNo.length == 0">
              <div class="right-bg"></div>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
    <v-footer
      v-show="vfooterflag"
      :count="orderListScanned"
      :orderCount="
        orderCodeList.filter((item) => {
          return item !== '';
        }).length
      "
      :countData="countData"
      @reflash="reflashData"
      @scanFun="switchScanFun"
      :orderList="cleanOrderList"
      :deliveryId="deliveryId"
      :actualQty="actualQty"
      :orderId="orderId"
      @isLoading_="fullscreenLoading"
      :yiScanNumber="yiScanNumber"
      :scanned="scanned"
      :notScanned="notScanned"
      :orderListScanned="orderListScanned"
      :OMSNum="OMSNum"
      :historyLabelNo="historyLabelNo"
      :notScanLabelNo="notScanLabelNo"
      :address="address"
      :vehicleNo="vehicleNo"
    >
    </v-footer>
    <v-confirm ref="message"></v-confirm>
    <pictureSample v-show='sampleShow' linkNode='20k'></pictureSample>
    <div class="CarrierSelection" v-if='CarrierSelection_show'>
			<div class="CarrierSelectionBox">
				<div class="CarrierSelection_head">提示</div>
				<div class="CarrierSelection_content">
          <p>该订单地址与您选择中地址不符,是否添加该订单继续操作？</p>
				</div>
				<div class="CarrierSelection_bottom">
					<div><span @click="CarrierSelection_show = false">取消</span></div>
					<div><span @click="CarrierSelectionConfirm">确定</span></div>
				</div>
			</div>
		</div>
  </div>
</template>
<script>
import Scan from '@/components/ContinuousScan';
import CommitFooter from '@/components/CarScanCommitFooter';
import pictureSample from '@/components/pictureSample'
import Confirm from '@/components/confirm';
import tts from '@/utils/tts2'
import {
  getAviationOrderNumber,
  independentUploadImage,
} from '../../../api/api';
export default {
  name: 'OrderScanCar',
  components: {
    "v-scan": Scan, // 扫描组件
    "v-footer": CommitFooter, // 提交组件
    "v-confirm": Confirm,
    'pictureSample': pictureSample
  },
  data() {
    return {
      independentUploadImage,
      activeName: 'first',
      orderCount: 0, // 订单号数量统计
      countData: [], // 需要提交给后台的对象数组
      orderList: [], // 运单号列表
      orderCodeList: [], // 订单号列表
      cleanOrderList: [], // 只有运单号的数组
      orderListScanned: [], // 本次扫描的标签好列表
      historyLabelNo: [], // 历史标签号数据数组
      notScanLabelNo: [], // 未扫描标签号数据
      loadingData: false,
      switchScan: true,
      deliveryId: '', // 运单id
      orderId: '', // 订单id
      actualQty: 0, // 订单总件数
      yiScanNumber: 0, // 上次已扫描数量
      notScanned: [], // 未扫描标签
      scanned: [], // 历史标签
      OMSNum: 0, // 订单数量
      ifflash: false,
      vfooterflag: true, // 底部是否出现
      sampleShow: false, // 图片示例是否展示
      isBatch: false, // 是否是批量提交
      consignesList: [],
      address: '',
      CarrierSelection_show: false, 
      currentOms: {},
      labelNo: '',
      vehicleList: [],
      vehicleNo: '',
      time:  this.timestampFormat(new Date().getTime(), 'YYYY-MM-DD'),
      classes: '',
      type: '',
      classesList: [],
      typeList: []
    };
  },
  mounted() {},
  created() {
    this.getVehicleList()
    this.getClassesList()
    this.getTypeList()
    // this.getQueryConsignesList()
    // if (!(this.getItem('SXJF_ifScan') && this.getItem('SXJF_ifScan') == '是')) {
    //   // 安卓
      // try {
      //   CallAndroidOrIOS.ContinuousScan();
      // } catch (error) {}
    // }
    // // 苹果
    // try {
    //   window.webkit.messageHandlers.messageSend.postMessage({
    //     a: '调用app原生半屏扫描二维码/条码',
    //   });
    // } catch (error) {}
    // if (this.$route.query.deliveryId) {
    //   this.deliveryId = this.$route.query.deliveryId;
    // }
    // if (this.$route.query.orderId) {
    //   this.orderId = this.$route.query.orderId;
    // }
  },
  beforeDestroy() {
    // 安卓
    try {
      CallAndroidOrIOS.CancelScan();
    } catch (error) {}
    // 苹果
    try {
      window.webkit.messageHandlers.messageSend.postMessage({
        a: '离开app原生半屏扫描二维码/条码',
      });
    } catch (error) {}
  },
  methods: {
    getTypeList() {
      let that = this
      const params = {
        "keyName": '装车类型'
      }
      this.httpRequest1('post', '/system/app/queryDataDictionary', params).then((res) => {
        that.typeList = res.data
      })
    },
    getClassesList() {
      let that = this
      const params = {
        "keyName": '班次'
      }
      this.httpRequest1('post', '/system/app/queryDataDictionary', params).then((res) => {
        that.classesList = res.data
      })
    },
    getVehicleList(vehicleNo) {
      let that = this
      const params = {
        "vehicleNo": vehicleNo
      }
      this.httpRequest1('post', '/system/vehicleMaster/queryVehicleMasterApp', params).then((res) => {
        that.vehicleList = res.data.list 
      })
    },
    getQueryConsignesList (address) {
      let that = this
      const params = {
        "address": address
      }
      this.httpRequest1('post', '/system/app/queryConsignesList', params).then((res) => {
        that.consignesList = res.data
      })
    },
    // 选择转寄承运商弹框确认按钮
    CarrierSelectionConfirm() {
      this.orderListScanned.push(this.currentOms)
      this.orderList.push(this.currentOms.omsNo)
      this.CarrierSelection_show = false;
    },
    // 关闭扫描框
    closeScan() {
      // 安卓
      try {
        CallAndroidOrIOS.CancelScan();
      } catch (error) {}
      // 苹果
      try {
        window.webkit.messageHandlers.messageSend.postMessage({
          a: "离开app原生半屏扫描二维码/条码",
        });
      } catch (error) {}
    },
    //打开或关闭 闪光灯
    flashOpenOrClose() {
      let that = this;
      // 安卓
      try {
        if (that.ifflash) {
          CallAndroidOrIOS.setTorchEnabled_false(); // setTorchEnabled_false  闪光灯 关闭
          that.ifflash = false;
        } else {
          CallAndroidOrIOS.setTorchEnabled_true(); // setTorchEnabled_true  闪光灯 打开
          that.ifflash = true;
        }
      } catch (error) {}
      // 苹果
      try {
        window.webkit.messageHandlers.messageSend.postMessage({
          a: '打开或关闭闪光灯',
        });
      } catch (error) {}
    },
    // 关闭扫码框
    CloseScanBox() {
      // 安卓
      try {
        CallAndroidOrIOS.CancelScan();
      } catch (error) {}
      // 苹果
      try {
        window.webkit.messageHandlers.messageSend.postMessage({
          a: '离开app原生半屏扫描二维码/条码',
        });
      } catch (error) {}
    },
    // 加载特效出现  子传父事件
    fullscreenLoading(isLoad, loadingText) {
      this.$emit('isLoading', isLoad, loadingText);
    },
    switchScanFun(data) {
      if (data) {
        this.switchScan = true; // 打开摄像头
      } else {
        this.switchScan = false; // 关闭摄像头
      }
    },
    sampleAppear() {
      this.sampleShow = true;
    },
    // 提示框
    userBehaviorFun() {},
    /**
     * 删除单条不要的数据
     **/
    deleteItem(key) {
      this.orderList = this.orderList.filter((item) => {
        return item.order !== key;
      });
      let arr = [];
      for (let i in this.orderList) {
        arr.push(this.orderList[i]['orderBooting']);
      }
      // 去重
      function unique(list) {
        return Array.from(new Set(list));
      }
      // this.orderCodeList = unique(arr)
      this.cleanOrderList = [];
      for (let item in this.orderList) {
        this.cleanOrderList.push(this.orderList[item].order);
      }
    },
    /**
     * 提交成功清空数据
     **/
    reflashData() {
      this.countData = [];
      this.orderList = [];
      this.orderCodeList = [];
      this.cleanOrderList = [];
      this.OMSNum = 0;
      this.notScanned = [];
      this.scanned = [];
      this.orderListScanned = []; // 本次扫描的标签好列表
      this.historyLabelNo = []; // 历史标签号数据数组
      this.notScanLabelNo = []; // 未扫描标签号数据
    },
    /**
     * 从子组件{scan.vue}获取传过来的数据
     * @param data 标签号
     */
    scanData(data) {
      if (!this.type) {
        this.$alert('请先选择装车类型', '提示', {
          confirmButtonText: '确定'
        })
        return
      }
      if (!this.classes) {
        this.$alert('请先选择班次', '提示', {
          confirmButtonText: '确定'
        })
        return
      }
      if (!this.vehicleNo) {
        this.$alert('请先选择车牌号', '提示', {
          confirmButtonText: '确定'
        })
        return
      }
      if (!this.time) {
        this.$alert('请先选择日期', '提示', {
          confirmButtonText: '确定'
        })
        return
      }
      if (this.orderList.includes(data)) {
        this.$alert('请不用重复扫描', '提示', {
          confirmButtonText: '确定'
        })
        return
      }
      this.address = this.timestampFormat(this.time, 'YYYY-MM-DD') + this.classes + this.type
      let that = this
      const params = {
        "omsNo": data,
        "type": this.type
      }
      this.OMSNum = 1
      this.httpRequest1('post', '/system/app/queryOrderByOmsNoByLoad', params).then((res) => {
        if (res.success) {
          that.orderListScanned.unshift({...res.data, labelNo: data})
          that.orderList.unshift({...res.data, labelNo: data})
        }
      }) 
    },

    
    // this.httpRequest1('post', '/system/app/queryOrderByOmsNoSupportNot', params).then((res) => {
    //     if (res.success) {
    //       that.orderListScanned.unshift({...res.data, labelNo: data})
    //       that.orderList.unshift({...res.data, labelNo: data})
    //     }
    //   })
    /**
     * 获取当前扫描时候的数据时间
     **/
    getTheTimeNow() {
      const date = new Date();
      let year = date.getFullYear();
      let month = checkVal(date.getMonth() + 1);
      let day = checkVal(date.getDay());
      let hour = checkVal(date.getHours());
      let min = checkVal(date.getMinutes());
      let sec = checkVal(date.getSeconds());
      function checkVal(val) {
        if (val < 10) {
          return '0' + val;
        } else {
          return val;
        }
      }
      return `${year}-${month}-${day} ${hour}:${min}:${sec}`;
    },
    /**
     * 数组去重方法
     **/
    distinct(a, b) {
      let arr = a.concat(b);
      let result = [];
      let obj = {};
      for (let i of arr) {
        if (!obj[i]) {
          result.push(i);
          obj[i] = 1;
        }
      }
      return result;
    },
    // 0. 检测扫描标签中是否存在正在扫描的标签，有的话提示已扫描，否则进入下一步
    step0(val) {
      let _this = this;
      return new Promise((resolve) => {
        let arr = _this.orderList.filter((item) => {
          return item.order == val;
        });
        resolve(arr);
      });
    },
    // 1. 检测比对历史数据以及未扫描数据，排查是否存在该标签号
    step1(val) {
      let _this = this;
      return new Promise((resolve, reject) => {
        let arr = _this.historyLabelNo.filter((item) => {
          return item == val;
        });
        resolve(arr);
      });
    },
    // 2. 当比对历史数据不存在扫描到的标签号的时候再查询未查询扫描信息的列表进行比对
    step2(val) {
      let _this = this;
      return new Promise((resolve, reject) => {
        let arr = _this.notScanLabelNo.filter((item) => {
          return item == val;
        });
        resolve(arr);
      });
    },
    /**
     * 调用接口{ getAviationOrderNumber }获取运单的订单号
     * @param params 请求的传参{ 扫描的标签号 }，data { 标签号 }
     */
    getTheOrderNum(params, data) {
      let _this = this;
      let that = this;
      // this.loadingData = true;
      this.httpRequest1('post', getAviationOrderNumber, params)
        .then((res) => {
          let obj = res.entity;
          _this.$refs.ch.code = '';
          if (res.entity.notScanned) {
            that.notScanned = that.notScanned.concat(res.entity.notScanned);
          }
          if (res.entity.scanned) {
            that.scanned = that.scanned.concat(res.entity.scanned);
          }
          // _this.loadingData = false
          _this.OMSNum = parseInt(_this.OMSNum) + 1;
          function reSetData() {
            return new Promise((resolve) => {
              // 首先整合请求到的数据列表
              if (obj.scanned && obj.scanned.length) {
                _this.historyLabelNo = _this.historyLabelNo.concat(
                  obj.scanned[0].waybillNumber
                );
              }
              if (obj.notScanned && obj.notScanned.length) {
                _this.notScanLabelNo = _this.notScanLabelNo.concat(
                  obj.notScanned[0].waybillNumber
                );
              }
              // 数组去重
              function unique(list) {
                return Array.from(new Set(list));
              }
              _this.historyLabelNo = unique(_this.historyLabelNo);
              _this.notScanLabelNo = unique(_this.notScanLabelNo);
              resolve(true);
            });
          }
          reSetData().then((resolve) => {
            if (resolve) {
              // 逻辑运行
              _this.step1(data).then((data1) => {
                if (data1.length !== 0) {
                  // 1. 当匹配到的数据存在的时候，提示用户该标签号曾经扫描保存过
                  _this.$refs.message.show('该标签号已扫描保存过!', {
                    type: 'alert',
                    confirmText: '确定',
                    titleText: '请注意',
                  });
                  // _this.orderCodeList = _this.distinct(_this.orderCodeList, obj.omsNo)
                } else {
                  _this.step2(data).then((data2) => {
                    // 2. 当历史保存数据中没搜索到相关记录，再查找未扫描的标签号是否存在这个正在扫描的标签号
                    if (data2.length !== 0) {
                      // 在未扫描数据中匹配到该未扫描标签号，保存起来展示到列表中
                      // 删除添加到扫描标签的未扫描标签
                      _this.notScanLabelNo = _this.notScanLabelNo.filter(
                        (item) => {
                          return item !== data;
                        }
                      );
                      for (let jh = 0; jh < _this.notScanned.length; jh++) {
                        _this.notScanned[jh].waybillNumber = _this.notScanned[jh].waybillNumber.filter((item) => {
                          if (item == data) {
                            _this.orderList.push({
                              order: data,
                              omsno: _this.notScanned[jh].omsNo,
                              orderBooting: '',
                              time: _this.getTheTimeNow(),
                            });
                            try {
                              tts.speek(_this.notScanned[jh].toAirportCityName + _this.notScanned[jh].flightNo)
                            }
                            catch(error) {}
                            if (_this.orderListScanned.length) {
                              let _scanflag = false;
                              for (
                                let l = 0;
                                l < _this.orderListScanned.length;
                                l++
                              ) {
                                if (
                                  _this.orderListScanned[l].order ==
                                  _this.notScanned[jh].omsNo
                                ) {
                                  _this.orderListScanned[l].waybillNumber.push(
                                    item
                                  );
                                  _scanflag = true;
                                }
                              }
                              if (!_scanflag) {
                                _this.orderListScanned.unshift({
                                  order: _this.notScanned[jh].omsNo,
                                  orderBooting: '',
                                  time: _this.getTheTimeNow(),
                                  waybillNumber: [item],
                                  flag: _this.notScanned[jh].flag,
                                  flightDate: _this.notScanned[jh].flightDate,
                                  flightNo: _this.notScanned[jh].flightNo,
                                  toAirportName: _this.notScanned[jh].toAirportName,
                                  toAirportCityName:_this.notScanned[jh].toAirportCityName,
                                  printInfo: res.entity.printInfo,
                                  businessType: _this.notScanned[jh].businessType
                                });
                              }
                            } else {
                              _this.orderListScanned.unshift({
                                order: _this.notScanned[jh].omsNo,
                                orderBooting: '',
                                time: _this.getTheTimeNow(),
                                waybillNumber: [item],
                                flag: _this.notScanned[jh].flag,
                                flightDate: _this.notScanned[jh].flightDate,
                                flightNo: _this.notScanned[jh].flightNo,
                                toAirportName: _this.notScanned[jh].toAirportName,
                                toAirportCityName:_this.notScanned[jh].toAirportCityName,
                                printInfo: res.entity.printInfo,
                                businessType: _this.notScanned[jh].businessType
                              });
                            }
                          }
                          return item !== data;
                        });
                        if (_this.notScanned[jh].waybillNumber.length <= 0) {
                          _this.notScanned.splice(jh, 1);
                        }
                      }
                    } else {
                      // 保存的数据与未保存的历史数据都不存在该记录的话则是因为不存在该标签号，提示用户标签号错误
                      _this.$refs.message.show('标签号错误，请重新扫描!', {
                        type: 'alert',
                        confirmText: '确定',
                        titleText: '请注意',
                      });
                    }
                  });
                }
              });
            }
          });
          this.cleanOrderList = [];
          for (let item in this.orderList) {
            this.cleanOrderList.push(this.orderList[item].order);
          }
          // this.loadingData = false
        })
        .catch((err) => {
          this.$refs.ch.$refs["code"].select();
          // this.loadingData = false
        });
    },
    //上传完成后（包含部分上传失败）
    finishUpload(text) {
      let that = this;
      that.$emit('isLoading_', false);
      text = text ? ',' + text : '';
      // this.$alert("扫描保存成功" + text, "提示", {
      //   confirmButtonText: "确定",
      //   callback() {
      //     that.$router.back(-1);
      //   },
      // });
      that.$confirm('扫描保存成功' + text + ' 是否打印分拣标签？', '提示', {
        confirmButtonText: '打印',
        cancelButtonText: '放弃',
        type: 'warning'
      }).then(() => {
        let json = '';
        for (let i = 0; i < that.orderListScanned.length; i++) {
          let order = that.orderListScanned[i];
          order.p_tags = []
          for (let j in that.orderListScanned[i].printInfo) {
            that.orderListScanned[i][j]= that.orderListScanned[i].printInfo[j]
          }
          // that.orderListScanned[i].p_tags = 
          for (let k in that.orderListScanned[i].printInfo.labelInfo) {
            let infoitem = that.orderListScanned[i].printInfo.labelInfo[k];
            if (that.isBatch){
              order.p_tags.push({
                'sortNum': infoitem,
                'productNo': k
              })
            } else {
              that.orderListScanned[i].waybillNumber.filter((item) =>{
                if (item == k) {
                  order.p_tags.push({
                    'sortNum': infoitem,
                    'productNo': item
                  })
                }
              })
            }
          }
        }
        json = JSON.stringify(that.orderListScanned)
          // 安卓
        try {
          CallAndroidOrIOS.callAndroid('航空标签打印', json);
        } catch (error) {}
        // 苹果
        try {
          window.webkit.messageHandlers.messageSend.postMessage({
          a: '航空标签打印',
          b: json
          })
        } catch (error) {}
        that.reflashData();
      }).catch(() => {
        that.reflashData();
      });
    },
    goPrev() {
			this.closeScan()
      this.$router.go(-1);
    }
  },
};
</script>
<style scoped lang="less">
.common-box {
  height: 100%;
}
.Upload {
  font-size: 28/50rem;
  display: block;
  padding-bottom: 50/50rem;
  .uploadImg {
    span.sampleText{
      float: none;
    }
    & > div {
      float: static;
      margin-bottom: 10/50rem;
    }
  }
}
.order-list_item {
  font-size: 30/50rem;
  margin-bottom: 20/50rem;
  padding-bottom: 10/50rem;
  border-bottom: 1/50rem dotted #000000;
  .order-list_item_order {
    color: #777;
    span {
      float: right;
      color: #000;
    }
  }
  .order-list_item_flight {
    float: right;
    width: 300/50rem;
    text-align: right;
    color: #000;
    div {
      margin-bottom: 10/50rem;
    }
  }
  .order-list_item_flight_2 {
    float: right;
    width: 200/50rem;
    text-align: right;
    color: #000;
    div {
      margin-bottom: 10/50rem;
    }
  }
  .order-list_item_item {
    margin-top: 20/50rem;
    color: #000;
  }
}
.PickUpRandomScan_orderbox {
  height: 100%;
  width: 100%;
  position: fixed;
  top: 182px;
  // top: 280/50rem;
  left: 0;
  overflow: scroll;
  .level2 {
    margin-bottom: 860/50rem;
  }
}
header {
  height: 48px;
  line-height: 48px;
}
.address {
  margin-top: 10px;
  display: flex;
  img {
    width: 70/50rem;
		padding: 12/50rem;
		box-sizing: border-box;
		height: 70/50rem;
		line-height: 80/50rem;
  }
  .ok-btn {
    width: 76/50rem;
    height: 76/50rem;
    font-size: 28/50rem;
    line-height: 80/50rem;
    margin: 0 10/50rem;
    text-align: center;
    background-color: #038EEA;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
  }
  input {
    flex: 1;
    border: none;
    line-height: 37px;
    height:37px;
    padding-left: 10/50rem;
    box-sizing: border-box;
    outline: none;
    border: 1px solid #e1e1e1;
  }
}
.currentAddress {
  font-size: 28/50rem;
  padding: 20/50rem;
  color: #9b9b9b;
}
/deep/ .el-select-dropdown.el-popper {
  left: 0 !important;
  z-index: 9999;
}
.el-select-dropdown .el-select-dropdown__item {
  white-space: normal;
  line-height: 20px !important;
  height: inherit;
  border-bottom: 1px solid #e1e1e1;
  padding-top: 5px;
  padding-bottom: 5px;
}
.CarrierSelection {
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.6);
		position: fixed;
		top: 0;
		left: 0;
		z-index: 99999999;
		font-size: 28/50rem;
		.CarrierSelectionBox {
			width: 600/50rem;
			background-color: #fff;
			position: fixed;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			border-radius: 15/50rem;
			.CarrierSelection_head {
				text-align: center;
				height: 80/50rem;
				line-height: 80/50rem;
				border-bottom: 1/50rem solid #ddd;
			}
			.CarrierSelection_content {
				line-height: 40/50rem;
        padding: 30/50rem;
        text-align: center;
			}
			.CarrierSelection_bottom {
				overflow: hidden;
				margin: 30/50rem 0;
				& > div {
					width: 50%;
					float: left;
					text-align: center;
					height: 60/50rem;
					line-height: 60/50rem;
					span {
						width: 80%;
						border-radius: 30/50rem;
						display: block;
						margin: 0 auto;
						background-color: #038EEA;
						color: #fff;
					}
				}
			}
		}
	}
</style>